package cn.lanqiao.business.utils;

public class ArrayUtils {

    public static int[] getArray(int sum){
        //sum是期末项目总分
        if(sum>100){
            System.out.println("成绩不能大于100");
            return null;
        }
         int num =100-sum;//num = 剩余的分数
        //分数存进数组中
         int arr[] = new int[]{5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5};
         //从数组的第0位开始减
        for(int i=0;i<num;i++){
            int i1 = i % 20;
            arr[i1]=arr[i1]-1;
        }
        return arr;
    }
}
